This page last changed on Sep 16, 2008 by dhommel.

The queue tag

The queue tag allows to configure the behavior of your build queues. It allows to configure how duplicate requests are handled within a queue and it also allows to configure locks that queues can acquire against each other.

Attribute Description Type Required Default
name The name of the queue. string true empty
duplicates Specification of how to handle duplicate requests within a queue. Possible values are UseFirst, ApplyForceBuildsReplace and ApplyForceBuildsReAdd. string false UseFirst
lockqueues A comma separated list of queue names that the queue should acquire a lock against. string false empty

Full example:

<queue name="Q1" duplicates="UseFirst" lockqueues="Q2, Q3" />

Duplicate Handling

There are three different settings that can be used to specify how force build requests should be handled.

The default behavior is to not allow force build requests to update the queue and use the first request that was added.

The following example shows how to explicitly configure the default behavior.

<cruisecontrol>
  <queue name="Q1" duplicates="UseFirst"/>

  <project name="MyFirstProject" queue="Q1" queuePriority="1">
    ...
  </project>
</cruisecontrol>

The following example shows how to configure a queue so that force build requests will replace existing requests of the interval trigger without changing the position of the request in the queue.

<cruisecontrol>
  <queue name="Q1" duplicates="ApplyForceBuildsReplace"/>

  <project name="MyFirstProject" queue="Q1" queuePriority="1">
    ...
  </project>
</cruisecontrol>

The following example shows how to configure a queue so that force build requests will remove existing requests of the interval trigger and readd a force build request. This is changing the position of the request in the queue.

<cruisecontrol>
  <queue name="Q1" duplicates="ApplyForceBuildsReAdd"/>

  <project name="MyFirstProject" queue="Q1" queuePriority="1">
    ...
  </project>
</cruisecontrol>

Locking

The following example shows how to configure two queues, Q1 and Q2, that acquire a lock against each other. That means that while the queue Q1 is building a project the queue Q2 is locked. While Q2 is building Q1 is locked. To specify more than one queue that should be locked use commas to separate the queue names within the lockqueues attribute. Of course the lockqueues attribute can be used together with the duplicates attribute explained above.

<cruisecontrol>
  <queue name="Q1" lockqueues="Q2"/>
  <queue name="Q2" lockqueues="Q1"/>

  <project name="MyFirstProject" queue="Q1" queuePriority="1">
    ...
  </project>
  ...

  <project name="MySecondProject" queue="Q2" queuePriority="1">
    ...
  </project>
  ...
</cruisecontrol>
Document generated by Confluence on Mar 14, 2009 02:55